<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core"  %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBliC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>"></base>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
<link type="text/css" rel="stylesheet" href="css/secondaryList.css" />
<title>二手淘吧二级列表</title>
</head>

<body>

	<div id="container">
		<div id="navi_container">
		
			<!--这里是navigation的顶部栏-->
			<div id="navi_top">
				<div class="navi_left">南昌站</div>
				<div class="navi_left">网页版</div>
				
				<div class="navi_right">推广使用</div>
				
				
			<c:choose>
               <c:when test="${sessionScope.nickName==null}">
               <div class="navi_right"><a href="#">注册</a></div>
               <div class="navi_right"><a href="user/login_queryLoginPage.action">登录</a></div>
               </c:when>                 
          	  <c:otherwise>
          	  
          	  <div class="navi_right"><a  href="user/PersonSpace_queryMsgStore.action">我的收藏</a></div>
          	  <div class="navi_right"><a href="user/login_doLogout.action">注销</a></div>
          	  <div class="navi_right"><a target="right" href="user/PersonSpace_queryLabelMsg.action">欢迎${sessionScope.nickName}</a></div>
          	 </c:otherwise>
        	</c:choose>
        	
        	
			</div>
			<!--这里是navigation的顶部栏-->
			
			<!--这里是navigation的infor栏-->
			<div id="navigation_infor">
				<div id="logo"><a href="index.jsp"><img src="img/logo.png" width="220" height="77" border="0"/></a></div>
				<div id="search_content">
						<form action="user/search_doSearch.action?pagebean.currentPage=1" method="post" name="search" id="search" >
							<input type="text" size="37" name="keyword" />
							<input type="submit" value="搜索" id="commomSearch" />
							<!-- <input type="submit" value="高级搜索" id="advanceSearch" /> -->
						</form>
				</div>
			</div>
			<!--这里是navigation的infor栏-->


			<!--这里是navigation导航栏-->
			<div id="navigation">
				<div class="navigator_space_left"></div>
				<a href="index.action"><div id="nvg0" class="navigator">首页</div></a>
				<c:forEach  var="catagory"  items="${list}"   varStatus="s">
			      <a href="user/publish_queryCataSecondList.action?catagoryId=${catagory.catagoryID}"><div id="nvg${s.index+1}" class="navigator">${catagory.catagoryName}</div></a>     
				</c:forEach>
			</div>
			<!--这里是navigation导航栏-->

			
		</div>
		
		<div class="category_location">
			<span class="bigCat">
			<c:forEach   var="catagory"  items="${list}"  >
			     <c:if test="${catagory.catagoryID==catagoryId}">
			        ${ catagory.catagoryName}
			     </c:if>
			</c:forEach>
			</span>
			
			
			<!-- 取当前页面所属二级类别 -->
			<c:forEach  var="msg"  items="${page.list}"  begin="1"  end="1"  step="1">
			    <c:set  scope="page"   value="${msg.smallId}"  var="var1"></c:set>
			</c:forEach>
			
			
			<c:forEach  var="small"     items="${smalls}">
			    <span class="smallCat">
			      <a href="user/publish_querySecondList.action?smallId=${small.smallID}&catagoryId=${small.catagoryID}">
			      
			      
			      <c:choose>
			        <c:when test="${var1==small.smallID}">
			           <span  class="bigCat">${small.smallName}</span>
			        </c:when>
			        <c:otherwise>
			           ${small.smallName}
			        </c:otherwise>
			      </c:choose>
			     
			      
			      </a>
			    </span>
			</c:forEach>
			
		</div>
		
		<div id="content_container">
		
			<!--这里开始是中间内容左侧-->
			<div id="content_left">
			
			
			<!--这里开始顶部-->
				<div id="tie_title">
				</div>
			<!--这里开始顶部-->
			
			<c:forEach  var="msg"  items="${page.list}">
			
		     <!--这里是一个item-->
			<div id="item_block">
				<div id="item_img">
					<a  href="user/publish_queryPubMsg.action?pubMsg.publishID=${msg.publishID}"><img src="${msg.cover }" width="70" height="70" /></a>
				</div>
				<div id="item_title"><a  href="user/publish_queryPubMsg.action?pubMsg.publishID=${msg.publishID}">${msg.title}</a></div>
				<span style="margin-right:20px; float:right;line-height:30px;">${msg.postTime }</span>
				
				<!-- 取得当前记录的属性值 -->
                <c:forEach  var="attribute"   items="${msg.attributes}"  begin="1"  end="2"  step="1"   varStatus="s">
                     <c:if test="${s.index==1}">
                          <c:set  scope="page"   value="${attribute.attributeName}:${attribute.attributeValue}"  var="var1"></c:set> 
                     </c:if>
                     
                     <c:if test="${s.index==2}">
                          <c:set  scope="page"   value="${attribute.attributeName}:${attribute.attributeValue}" var="var2"></c:set> 
                     </c:if>
                     
                     <c:if test="${s.index==3}">
                          <c:set  scope="page"   value="${attribute.attributeName}:${attribute.attributeValue}" var="var2"></c:set> 
                     </c:if>
                </c:forEach>
                
				
				<div id="item_content">${var1}&nbsp;&nbsp;&nbsp;
				                       ${msg.cityName}&nbsp;&nbsp;&nbsp;${msg.univerName}</div>
				<div id="item_content" style="color:#FF0000;">${var2}&nbsp;&nbsp;&nbsp;&nbsp;${var3}</div>
			</div>
			<!--这里是一个item-->
			</c:forEach>
			 
			 <div>
			 
		        <span class="page_inner">
		            &nbsp;&nbsp;&nbsp;共${page.current_page}页&nbsp;&nbsp;&nbsp;共${page.rowCount}条记录
			                      &nbsp;&nbsp;&nbsp;
		           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		            <a  href="${url}&page.current_page=1">首页</a>&nbsp;&nbsp;&nbsp;&nbsp;
		            <a  href="${url}&page.current_page=${page.previousPage}">上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;
		            <a  href="${url}&page.current_page=${page.lastPage}">下一页</a>&nbsp;&nbsp;&nbsp;&nbsp;
		            <a  href="${url}&page.current_page=${page.pageCount}">尾页</a>&nbsp;&nbsp;&nbsp;&nbsp;
		        </span>
		      
		      
		      
			 </div>
            
			</div>	
			<!--这里开始是中间内容左侧-->
			
			
			
			<!--这里开始是中间内容右侧-->
			
			
			
			<div id="content_right">
				<div id="bar_public_notice">
					<div id="bar_public_head">最新发布</div>
					<div style="height:auto">
						<ul style="height:auto; padding-bottom:5px;list-style: none">
						
						<c:forEach  var="msg"  items="${msgs}">
						   <li><a  href="user/publish_queryPubMsg.action?pubMsg.publishID=${msg.publishID}">${msg.title}</a></li>
						</c:forEach>
						
						</ul>
					</div>
				</div>
				
				<div id="bar_public_notice">
					<div id="bar_public_head">公告栏</div>
					<div style="height:auto">
						<ul style="height:auto; padding-bottom:5px;list-style: none">
						  <c:forEach  var="msg"  items="${page.list}"  begin="1"  end="1">
						      <a href="user/topic_cityPages.action?smallId=${msg.smallId}"><li>${msg.smallName}吧入口</li></a>
						  </c:forEach>
						</ul>
					</div>
				</div>
			</div>			
			
			
			<!--这里开始是中间内容右侧-->
			
		</div>

		<div style="clear:left;"></div>
		
			
		</div>
		<div id="navigation_bottom">
			<div class="navigator_bottom_space_left"></div>
			<a href="#"><div id="nvg1" class="navigator_bottom">&copy;&nbsp;&nbsp;2013-2014&nbsp;&nbsp;|</div></a>
			<a href="#"><div id="nvg2" class="navigator_bottom"  style="width:120px">江西师大&nbsp;&nbsp;|</div></a>
			<a href="#"><div id="nvg3" class="navigator_bottom" style="padding-left:0px;">简介&nbsp;&nbsp;|</div></a>
			<a href="#"><div id="nvg4"class="navigator_bottom">联系方法&nbsp;&nbsp;|</div></a>
			<a href="#"><div id="nvg5" class="navigator_bottom">招聘信息&nbsp;&nbsp;|</div></a>
			<a href="#"><div id="nvg6" class="navigator_bottom">关于我们&nbsp;&nbsp;|</div></a>
			<a href="#"><div id="nvg7" class="navigator_bottom">建议反馈</div></a>
		</div>

	</div>
	
</body>
</html>
